package com.guan.ordering_sys.generator.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.guan.ordering_sys.generator.entity.Goods;
import com.guan.ordering_sys.vo.GoodsVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 关远键
 * @since 2021-06-18
 */
@Repository
public interface GoodsMapper extends BaseMapper<Goods> {

    GoodsVo getGoodsByName(@Param("name") String name);

    Goods getGoodsById(@Param("id") Long id);

    IPage<GoodsVo> getList(Page<GoodsVo> goodsVoPage);

    IPage<GoodsVo> getListByTypeId(Page<GoodsVo> goodsVoPage, @Param("id") Long id);

}
